/**
 * User: alesj
 * Date: 2004.9.8
 * Time: 7:41:00
 */

package com.generalynx.common.data;

import java.io.Serializable;

public interface IVersion extends IDirty {

    /**
     * get version integer
     */
    public Integer getVersion();

    /**
     * check for version difference
     */
    public boolean check();

    /**
     * get id key
     */
    public Serializable getKey();

    /**
     * throw StaleObjectStateException if versions don't match
     * else operate on reloaded object
     */
    public boolean isStaleObjectState();

}
